home *** CD-ROM | disk | FTP | other *** search
- global gMovie1TimeCodes, gMovie2TimeCodes, gMovie3TimeCodes, gMovie4TimeCodes, gMarkerSlots, gFrames, gLabels, gPreviousTime, gStoredTime, gWhichMovie, gWhichClip, gSliderPositions, gMovieSprite, gStartTime, gStopTime, gBDrop, gVR, gFullScreen, gWhichCamera, gSliderCorrelation, gSliderCorrelationCount, gFloatingSprite, gAutomated, gAutomatedTimes, gWhichAutomatedClip, gRecording, gPlaying, gSliderSprite, gMarkers, gMinH, gMaxH
-
- on setProp startSprite, endSprite, whichProperty, whichValue
- repeat with x = startSprite to endSprite
- do("set the " & whichProperty & " of sprite x=" & whichValue)
- end repeat
- end
-
- on QT whichSprite
- if the type of sprite whichSprite > 0 then
- if the castType of cast the castNum of sprite whichSprite = #digitalVideo then
- return 1
- exit
- end if
- end if
- return 0
- end
-
- on stopAllQT
- repeat with x = 1 to 48
- if the type of sprite x > 0 then
- set whichCast to the castNum of sprite x
- if whichCast > 0 then
- if the castType of cast whichCast = #digitalVideo then
- set the movieRate of sprite x to 0
- end if
- end if
- end if
- end repeat
- updateStage()
- end
-
- on highlightSelection
- setProp(18, 21, "puppet", 0)
- setProp(24, 29, "puppet", 0)
- swapPlaybackScreen("playback dot")
- set whichSprite to 17 + gWhichMovie
- puppetSprite(whichSprite, 1)
- set the ink of sprite whichSprite to 4
- set whichSprite to 23 + gWhichClip
- puppetSprite(whichSprite, 1)
- set the ink of sprite whichSprite to 4
- updateStage()
- end
-
- on correlateSliderPositionsToMovieTime
- if listp(gAutomatedTimes) = 0 then
- exit
- end if
- set theCount to count(gAutomatedTimes)
- if theCount = 0 then
- exit
- end if
- set gSliderCorrelation to []
- set gSliderPositions to []
- set lTotalDuration to 0
- repeat with x = 1 to theCount
- set timeCodeX to getAt(gAutomatedTimes, x)
- if listp(timeCodeX) then
- set lWhichMovie to getAt(timeCodeX, 1)
- set lWhichClip to getAt(timeCodeX, 2)
- set numberOfClips to 0
- do("set numberOfClips=value ( count ( gMovie" & lWhichMovie & "TimeCodes ))")
- set lWhichClip to checkRange(lWhichClip, 1, numberOfClips)
- set lWhichCamera to getAt(timeCodeX, 3)
- set lStartTime to getAt(timeCodeX, 4)
- set lStopTime to getAt(timeCodeX, 5)
- repeat with MovieFrame = lStartTime to lStopTime
- append(gSliderCorrelation, [lWhichMovie, lWhichClip, lWhichCamera, MovieFrame, x])
- set MovieFrame to MovieFrame + 5
- end repeat
- set lDuration to lStopTime - lStartTime
- setAt(gSliderPositions, x, lDuration)
- set lTotalDuration to lTotalDuration + lDuration
- end if
- end repeat
- set gSliderCorrelationCount to count(gSliderCorrelation)
- set minH to 0
- set maxH to 0
- set lMinH to 133
- set lMaxH to 333
- set sliderLength to lMaxH - lMinH
- if lTotalDuration < 1 then
- set lTotalDuration to 1
- end if
- set newCount to count(gSliderPositions)
- repeat with x = 1 to newCount
- set whichCodesX to getAt(gAutomatedTimes, x)
- if listp(whichCodesX) then
- set clipDuration to getAt(gSliderPositions, x)
- set thePercentage to clipDuration * 1.0 / lTotalDuration * sliderLength
- set maxH to integer(minH + thePercentage)
- set maxSlider to sliderLength - (theCount - x)
- if minH > maxSlider then
- set minH to maxSlider
- end if
- if maxH > maxSlider then
- set maxH to maxSlider
- end if
- setAt(whichCodesX, 6, minH + lMinH)
- setAt(whichCodesX, 7, maxH + lMinH)
- setAt(gAutomatedTimes, x, whichCodesX)
- set minH to maxH + 1
- end if
- end repeat
- end
-
- on getMarkerName
- return getaProp(gFrames, marker(0))
- end
-
- on getMarkerFrame whichLabel
- return getaProp(gLabels, whichLabel)
- end
-
- on initMarkerList
- set theLabelList to the labelList
- set gMarkerSlots to [:]
- repeat with x = 1 to the number of lines in theLabelList
- set labelX to label(x)
- set stringX to string(line x of theLabelList)
- do("addProp gFrames, #" & labelX & ", stringX")
- do("addProp gLabels, #" & stringX & ", labelX")
- end repeat
- end
-
- on createLabelGlobals
- set theLabelList to the labelList
- set newGlobalScript to EMPTY
- set newSetGlobalScript to EMPTY
- repeat with x = 1 to the number of lines in theLabelList - 1
- set lineX to line x of theLabelList
- if lineX <> EMPTY then
- set newGlobal to "f"
- repeat with y = 1 to the number of words in lineX
- set newGlobal to newGlobal & word y of lineX
- end repeat
- if newGlobal <> EMPTY then
- repeat with y = 1 to the number of chars in newGlobal
- set charY to char y of newGlobal
- if charY = EMPTY then
- exit repeat
- end if
- if charY >= "A" then
- if charY <= "Z" then
- next repeat
- end if
- end if
- if charY >= "0" then
- if charY <= "9" then
- next repeat
- end if
- end if
- if charY = "." then
- next repeat
- end if
- delete char y of newGlobal
- set y to y - 1
- end repeat
- if newGlobal <> EMPTY then
- set globalAlreadyInUse to 0
- repeat with y = 1 to the number of items in newGlobalScript
- if newGlobal = item y of newGlobalScript then
- set globalAlreadyInUse to 1
- exit repeat
- end if
- end repeat
- if globalAlreadyInUse = 0 then
- set newGlobalScript to newGlobalScript & newGlobal & ","
- set newSetGlobalScript to newSetGlobalScript & RETURN & " set " & newGlobal & "=label (" & QUOTE & lineX & QUOTE & ")"
- end if
- end if
- end if
- end if
- end repeat
- set newGlobalScript to char 1 to the number of chars in newGlobalScript - 1 of newGlobalScript
- set newScript to RETURN & RETURN & "on setLabelGlobals" & newSetGlobalScript & RETURN & "end" & RETURN & RETURN
- set newScript2 to "on advanceFrame whichFrame" & RETURN & " do (" & QUOTE & "go frame " & QUOTE & "& whichFrame )" & RETURN & "end"
- set the scriptText of cast the number of cast "setLabelGlobals" to "global " & newGlobalScript & newScript & newScript2
- end
-
- on checkCodes
- set gMovie1TimeCodes to [[0, 8420], [8486, 16899], [16965, 22970], [23036, 29037], [29103, 35303], [35369, 41559], [41625, 47781], [47848, 54008], [54074, 58210], [58276, 62415], [62481, 65395], [65471, 68376]]
- repeat with x = 1 to count(gMovie1TimeCodes)
- set timeCodesX to getAt(gMovie1TimeCodes, x)
- set startTimeCode to value(getAt(timeCodesX, 1))
- set stopTimeCode to value(getAt(timeCodesX, 2))
- put x & ". startTime: " & startTimeCode & " stopTime: " & stopTimeCode & " duration: " & stopTimeCode - startTimeCode
- end repeat
- end
-